package com.hs.room.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import androidx.room.RawQuery
import androidx.room.Update
import androidx.sqlite.db.SupportSQLiteQuery
import com.hs.room.model.sys.SysAlarmInfo
import kotlinx.coroutines.flow.Flow

@Dao
interface SysAlarmInfoDao {

     @Insert
     fun insertSysAlarmInfo(sysAlarmInfo: SysAlarmInfo)

     @Update
     fun updateSysAlarmInfo(sysAlarmInfo: SysAlarmInfo) : Int

    /**
     * 条件查询
     */
     @Query("SELECT * FROM sys_alarm_info LIMIT :pageSize OFFSET :pageIndex")
     fun getSysAlarmInfoByCombinedConditions( pageIndex: Int,
                                              pageSize: Int) :
            Flow<List<SysAlarmInfo>>




}